<!-- Unauthorized.vue -->
<template>
    <div class="container">
        <h1>403 Forbidden</h1>
        <p>您没有访问该页面的权限</p>
        <button @click="goBack">返回上一页</button>
        <button @click="logout">重新登录</button>
    </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { useTokenStore } from '@/stores/token'

const router = useRouter()
const tokenStore = useTokenStore()

const goBack = () => router.go(-1)
const logout = () => {
    tokenStore.removeToken()
    router.push('/login')
}
</script>